<?php

require_once("model/IJson.php");

class Player implements IJson{
	
	public $playerid;
	public $firstName;
	public $MI;
	public $lastName;
	public $emailAddress;
	public $dob;
	public $homeTown;
	public $currentCity;
	public $bio;
	public $verified;
	public $locked;
	public $admin;
	public $appearance;
	public $deleted;
	
	
	function __construct(){
		$this->verified = 0;
		$this->locked = 0;
		$this->admin = 0;
		$this->deleted = 0;
	}
	
	function toJson(){
		$_json = "{".
				sprintf("\"playerid\":%d,", $this->playerid).
				sprintf("\"firstName\":\"%s\",", $this->firstName).
				sprintf("\"MI\":\"%s\",", $this->MI).
				sprintf("\"lastName\":\"%s\",", $this->lastName).
				sprintf("\"emailAddress\":\"%s\",", $this->emailAddress).
				sprintf("\"dob\":\"%s\",",$this->dob).
				sprintf("\"homeTown\":\"%s\",",$this->homeTown).
				sprintf("\"currentCity\":\"%s\",",$this->currentCity).
				sprintf("\"bio\":\"%s\",",$this->bio).
				sprintf("\"verified\":%d,",$this->verified).
				sprintf("\"locked\":%d,",$this->locked).
				sprintf("\"admin\":%d,",$this->admin).
				sprintf("\"appearance\":%d,",$this->appearance).
				sprintf("\"deleted\":%d",$this->deleted).
				"}";
		
		return $_json;
	}
} 
?>
